/*     */ package eos.moe.dragoncore;
/*     */ 
/*     */ import java.util.Arrays;
/*     */ import java.util.LinkedList;
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ public class xk
/*     */   extends nh
/*     */ {
/*  12 */   public static final xk w = new xk(Double.valueOf(0.0D));
/*  13 */   public static final xk q = new xk(Double.valueOf(1.0D));
/*     */   
/*     */   private final double g;
/*     */   
/*     */   public xk(Object object) {
/*  18 */     if (object instanceof Boolean) {
/*  19 */       this.g = ((Boolean)object).booleanValue() ? 1.0D : 0.0D;
/*  20 */     } else if (object instanceof Number) {
/*  21 */       this.g = ((Number)object).doubleValue();
/*     */     } else {
/*  23 */       this.g = 1.0D;
/*     */     } 
/*     */   }
/*     */   
/*     */   public o v(String str) {
/*  28 */     return v(str, uv.q);
/*     */   }
/*     */   
/*     */   public o v(String str, uv uv1) {
/*  32 */     LinkedList<String> linkedList = new LinkedList(Arrays.asList((Object[])str.split("\\.")));
/*  33 */     linkedList.poll();
/*  34 */     String str1 = linkedList.poll();
/*  35 */     if (str1 != null) {
/*  36 */       double d; switch (str1) {
/*     */         case "floor":
/*     */         case "向下取整":
/*  39 */           return ah.v(String.valueOf((int)Math.floor(this.g)));
/*     */         case "ceil":
/*     */         case "向上取整":
/*  42 */           return ah.v(String.valueOf((int)Math.ceil(this.g)));
/*     */         case "round":
/*     */         case "四舍五入":
/*  45 */           return ah.v(String.valueOf((int)Math.round(this.g)));
/*     */         case "subs":
/*     */         case "取部分小数":
/*  48 */           d = uv1.v(0, 0);
/*  49 */           if (d <= 0.0D) {
/*  50 */             d = 1.0D;
/*     */           } else {
/*  52 */             d = (int)Math.pow(10.0D, d);
/*  53 */           }  if (d != 1.0D) {
/*  54 */             return ah.v(String.valueOf(Math.floor(this.g * d) / d));
/*     */           }
/*  56 */           return ah.v(String.valueOf((int)Math.floor(this.g * d) / d));
/*     */         
/*     */         case "加":
/*     */         case "add":
/*  60 */           return new xk(Double.valueOf(this.g + uv1.v(0, 0.0D)));
/*     */         case "减":
/*     */         case "subtract":
/*  63 */           return new xk(Double.valueOf(this.g - uv1.v(0, 0.0D)));
/*     */         case "乘":
/*     */         case "mul":
/*  66 */           return new xk(Double.valueOf(this.g * uv1.v(0, 0.0D)));
/*     */         case "除":
/*     */         case "sub":
/*  69 */           return new xk(Double.valueOf(this.g / uv1.v(0, 0.0D)));
/*     */       } 
/*     */     
/*     */     } 
/*  73 */     return new xk(Double.valueOf(0.0D));
/*     */   }
/*     */ 
/*     */   
/*     */   public void v(String str, o o1) {}
/*     */ 
/*     */   
/*     */   public Double v() {
/*  81 */     return Double.valueOf(this.g);
/*     */   }
/*     */ 
/*     */   
/*     */   public String z() {
/*  86 */     return Double.toString(this.g);
/*     */   }
/*     */ 
/*     */   
/*     */   public double v() {
/*  91 */     return this.g;
/*     */   }
/*     */   
/*     */   public static xk v(Object a) {
/*  95 */     return new xk(a);
/*     */   }
/*     */ 
/*     */   
/*     */   public boolean equals(Object object) {
/* 100 */     if (this == object) return true; 
/* 101 */     if (object == null) return false; 
/* 102 */     if (object instanceof xk) {
/* 103 */       xk xk1 = (xk)object;
/* 104 */       return (Double.compare(xk1.v(), v()) == 0);
/* 105 */     }  if (object instanceof ah) {
/* 106 */       ah ah = (ah)object;
/* 107 */       return (Double.compare(ah.v(), v()) == 0);
/*     */     } 
/* 109 */     return false;
/*     */   }
/*     */ 
/*     */ 
/*     */   
/*     */   public String v() {
/* 115 */     return "double";
/*     */   }
/*     */ }


/* Location:              D:\fanbian\[D][龙之核心]DragonCore-2.6.0.3.jar!\eos\moe\dragoncore\xk.class
 * Java compiler version: 8 (52.0)
 * JD-Core Version:       1.1.3
 */